package com.comando.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * GroupT entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "group_t", catalog = "qunar")
public class GroupT implements java.io.Serializable {

	// Fields

	private Integer groupId;
	private String groupName;
	private Integer groupLevel;
	private String desc;
	private String state;
	//private Set<UserMemberT> userMemberTs = new HashSet<UserMemberT>(0);

	// Constructors

	/** default constructor */
	public GroupT() {
	}

	/** minimal constructor */
	public GroupT(Integer groupLevel, String state) {
		this.groupLevel = groupLevel;
		this.state = state;
	}

	/** full constructor */
	public GroupT(String groupName, Integer groupLevel, String desc,
			String state) {
		this.groupName = groupName;
		this.groupLevel = groupLevel;
		this.desc = desc;
		this.state = state;
		//this.userMemberTs = userMemberTs;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "GROUP_ID", unique = true, nullable = false)
	public Integer getGroupId() {
		return this.groupId;
	}

	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}

	@Column(name = "GROUP_NAME", length = 100)
	public String getGroupName() {
		return this.groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	@Column(name = "GROUP_LEVEL", nullable = false)
	public Integer getGroupLevel() {
		return this.groupLevel;
	}

	public void setGroupLevel(Integer groupLevel) {
		this.groupLevel = groupLevel;
	}

	@Column(name = "DESC")
	public String getDesc() {
		return this.desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@Column(name = "STATE", nullable = false, length = 2)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}
/*
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "groupT")
	public Set<UserMemberT> getUserMemberTs() {
		return this.userMemberTs;
	}

	public void setUserMemberTs(Set<UserMemberT> userMemberTs) {
		this.userMemberTs = userMemberTs;
	}*/

}